<template>
  <div>
    <Search />
    <List v-if="courseArr.length" :courseArr="courseArr" />
    <Add v-if="courseArr.length" :courseArr="courseArr" />
  </div>
</template>
<script>
import { tbDictDefinitionQueryEnumList } from "@/api/admin/system/dictionary";
export default {
  components: {
    Search: () => import("./components/Search.vue"),
    List: () => import("./components/List.vue"),
    Add: () => import("./components/Add.vue"),
  },
  data() {
    return {
      courseArr: [],
    };
  },
  mounted() {
    this.queryType();
  },
  methods: {
    //查询分类类型
    queryType() {
      tbDictDefinitionQueryEnumList({ code: "RESOURCE_CLASSIFICATION" }).then(
        (res) => {
          this.courseArr = res.data.data;
        }
      );
    },
  },
};
</script>